package cn.itcast.service.stat.impl;

import cn.itcast.dao.stat.StatDao;
import cn.itcast.service.stat.StatService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

@Service
public class StatServiceImpl implements StatService {

    // 注入dao
   @Autowired
   private StatDao statDao;

    @Override
    public List<Map<String, Object>> getFactorySale() {
        return statDao.getFactorySale();
    }

    /**
     * 需求2：商品销售统计排行
     *
     * @param top
     */
    @Override
    public List<Map<String, Object>> getProductSale(int top) {
        return statDao.getProductSale(top);
    }

    @Override
    public List<Map<String, Object>> getOnline() {
        return statDao.getOnline();
    }
}